#!/usr/bin/env python
# -*- coding: utf-8 -*-
# title       :
# description : ''
# author      : Aaron Hui Dango
# date        : 2018/10/26
# version     : 1.0
# usage       :
# notes       :

# Built-in modules
import logging
# Third-party modules
# Studio modules
# Local modules
import wrapt


def checking_name_decorator(sdandard_name):
    @wrapt.decorator
    def wrapper(func, instance, args, kwargs):
        if not sdandard_name == func():
            logging.error("wrong name!!")
        else:
            logging.info("right name!")
        return func(*args, **kwargs)
    return wrapper


